title: Using Case in WHERE condition MYSQL
body: <p>Is it possible to use CASE statement in WHERE condition like below?</p>
  <pre><code>SELECT act.id_activity FROM activity act
  LEFT JOIN work w ON w.id_work = act.id_work
  WHERE 
  w.work_type=1
  AND w.work_tender in (1,2)
  AND act.id_activity_type IN 
  (CASE WHEN w.work_tender=1 THEN '2,3' WHEN w.work_tender=2 THEN '2,3,4,9' END)
  </code></pre>
  <p>it returns no error but the results always display act.id_activity_type = 2 instead of 2,3 or 2,3,4,9</p>
  <p>In this case 1 work (table work) can have many activities (table activity). i want to display activities based on work.work_tender type. if work.work_tender=1 then need to choose activity.id_activity_type IN (2,3). if work.work_tender=2 then need to choose activity.id_activity_type IN (2,3,4,9)</p>