What I want to do is based on a condition switch between where clauses conditions.. is this possible?
This is an example, the actual procedure is much longer and I do not want to use if on select.
Is it possible?
declare @city varchar(100) = 'NY'
SELECT s.suppliers, o.order
FROM suppliers s
INNER JOIN orders o ON s.id = o.id
WHERE 
    CASE WHEN @city = 'NY' 
           THEN (s.SupplierName = o.SupplierName AND o.Row = 'New') 
         ELSE s.SupplierName = o.SupplierName 
    END
 
     
     
    