title: Query SyntaxError
body: <p>I'm fairly new to SQL. I simply want to generate a table and fill in some value under certain condition. Do you see any Syntax Error in this query? Very certain that the error is within the case statement because without the case statement, the table gets generated just fine.</p>
  
  <pre><code>q = "select tbuc.csId, tbui.role_type, 
  (case when tbui.role_type = "ROLE_USER" then 1 else 0 end) as
  assignment_submitted FROM tb_user_click tbuc, tb_user_info tbui WHERE 
  tbui.user_id = tbuc.uId and tbuc.csId = tbui.class_section_id;"
  </code></pre>
  
  <p>Also tried using IIF, the error message is as followed: </p>
  
  <pre><code>File "1.py", line 118
  q = "select tbuc.csId, tbui.role_type,IIF(role_type = "ROLE_USER", 1, 0) 
  as assignment_submitted FROM tb_user_click tbuc, tb_user_info tbui 
  WHERE tbui.user_id = tbuc.uId and tbuc.csId = tbui.class_section_id;"
  SyntaxError: invalid syntax
  </code></pre>