title: Using a select clause in a case statement in TD
body: <p>Is it possible to somehow use a select clause in a case statement in TD (rather than doing a join)?</p>
  
  <p>I would like to do something like this:</p>
  
  <pre><code>SELECT 
     id, 
     , count(*)
     , (CASE WHEN id IN ANY (SELECT DISTINCT ID FROM PARTICIPANTS_TABLE)                             
          THEN 1 ELSE 0 
        end) AS participant 
  FROM EVERYONE_TABLE
  GROUP BY id
  </code></pre>
  
  <p>The error I get is "Illegal expression in WHEN clause of CASE expression."</p>