Check out example codes for "sql server conditional where clause". It will help you in understanding the concepts better.

Code Example 1

select  * from transactionDetails
WHERE OrderID in (400376, 400379)
AND
    ((TransactionDate <> ProcessingDate AND TransactionId in (2,3,9,14,15)
    OR
     (TransactionDate = ProcessingDate AND TransactionId in (2,3,9)))

Learn ReactJs, React Native from akashmittal.com