I am creating a procedure with parameter and based on a parameter i have to place a different filter in where clause example is:
@para1
as
Select a,b,c from z
where @para1 = 0 then a = a
and @para1 = 1 then a between 1 to 10
and @para1 = 2 then a between 11 and 20
You could do something around these lines. Below combination of
AND
OR
works likeCASE