title: Using SQL IN statement based on case statement
body: <p>Is it possible to use <code>in</code> command based on case statement</p>
  
  <p>I have tried something like this</p>
  
  <pre><code>@Id int
  
  Select * 
  From Table 
  Where  StatusId in( case when Id =1 then 1 else 1,3 end)
  </code></pre>
  
  <p>and </p>
  
  <pre><code>    Select * 
      From Table 
      Where  StatusId in case when Id =1 then (1) else (1,3) end
  </code></pre>
  
  <p>Any Ideas!! </p>