I have a query that looks like this:
SELECT col1,col2
FROM dbo.table1
WHERE
(CASE WHEN col1 > 5 THEN col2) > 10
OR
(CASE WHEN col1 <= 5 THEN col2) > 20
I am trying to achieve a result set that will give me the following information: In case that col1>5 then retrieve all the values in col2 that are larger then 10 OR In case that col1 <= 5 then retrieve all the values in col2 that are larger then 20 , my question is: is the method above correct for filtering out that result set?