title: Switch case in where clause (sql server)
body: <p>I want to use case in sql statement where clause but I have a problem as I want to create a where clause condition on the basis of some value and I want to set a not in clause values on the basis of it </p>
  
  <p>here is the query where am facing an issue</p>
  
  <pre><code>WHERE CODE = 'x'  and 
     ID not in (
        case  
          when 'app'='A' then  '570','592'
          when  'Q' then ID 592,90
          else 592,90
        END
  </code></pre>
  
  <p>but its not syntax</p>