Q:

Where in case in SQL Server

If @IsPrice=0, ProductPrice=0 will return. If not, ProductPrice > 0 will return. This is what I want, but I could not write the code exactly. 
declare @Isprice bit=0

select * 
from [Product] p 
where case when @Isprice = 0 then p.ProductPrice = 0 else p.ProductPrice > 0 end

A:

A case expression returns a value, not an SQL fragment. You could get this behavior by using some logical operators, though:
SELECT *
FROM   [Product] p 
WHERE  (@Isprice = 0  AND p.ProductPrice = 0) OR
       (@Isprice <> 0 AND p.ProductPrice > 0)

