I need to write a store procedure for SQL Server. And it need to be something like:
Select * from tblSomething
Where param in (If param1 like 'string' select * from tblTable where condition1
Else select * from tblTable where condition2)
The problem all the if else examples print something and don't return select query. Can you help???