title: how to this query in right syntax or right way?
body: <p>i write this query using t-sql and give me an error (Incorrect syntax near the keyword 'OR')
  How to write it in correct way ?</p>
  
  <pre><code>SELECT SUM(Quantity) 
    FROM   Invoices
   WHERE  Invoices.InvoiceDocStatusID = 
          CASE @InventoryType
                        WHEN 1 
                        THEN ((2)OR(1))
                        ELSE 2
                      END
  </code></pre>