title: SQL Convert a char to boolean
body: <p>I have in my table one row with a char value. When the value is NULL then a false should be outputted. If the value is not NULL then a true should be outputted.</p>
  
  <p>So when I try to set <code>user_group.tUser</code> to 0 or 1 then I'm getting this error:</p>
  
  <p>Invalid column name 'false'.</p>
  
  <p>Invalid column name 'true'.</p>
  
  <pre><code>SELECT COALESCE((SELECT name
                  FROM   v_company 
                  WHERE  companyId = userView.companyId), ' ') AS company, 
      userView.value                                         AS companyUser, 
      userView.display                                       AS displayedUser,
      CASE 
          WHEN user_group.tUser IS NULL THEN 0
          ELSE 1
      END                                             AS userIsMemberOfGroup 
  FROM   v_user userView 
      LEFT OUTER JOIN cr_user_group user_group
                      ON ( user_group.group = 'Administrators' 
                          AND user_group.tUser = userView.value ) 
  ORDER  BY company ASC, 
          displayedUser ASC 
  </code></pre>