title: CASE with IN and SELECT subquery
body: <p>I want to perform IN statement with a Select subquery in a CASE logic (MySQL dialect's been using)</p>
  
  <p>So the idea of the query is like this:</p>
  
  <pre><code>select a.client_id,
  (case when a.client_id in (select distinct a.client_id from account a
  where a.display_name='b') then '1' else '0' end) as binary
  from account a
  group by a.client_id
  order by a.client_id
  </code></pre>
  
  <p>It shows error, so I'm wondering how it can be replaced and rewritten? </p>
  
  <p>Thanks!</p>