title: CASE statement with IN in WHERE clause
body: <p>I'm trying to create the following WHERE clause:</p>
  
  <pre><code>AND CASE @SomePRarmeter
  WHEN 'this' THEN
    user_id IN (SELECT * FROM dbo.func_Id1(@User))
  WHEN 'that' THEN
    user_id IN (SELECT user_id from dbo.func_Ids2(@OrgsForReporter)
  END
  </code></pre>
  
  <p>But I'm getting an error: Incorrect syntax near the keyword 'IN' (in the first condition) , although separately both of those conditions work. What would be the correct way to make such a statement work?</p>
  
  <p>Thanks!</p>