Sample Table:
Table1 (Userid, Name, Salary, Rank)
Query:
create procedure Proc_SelectDetails
as
@Salary int
begin
select * from Table1 where salary >= @Salary
end
If @salary > 50000
, check rank also (with salary) that should be greater than 6 else don't consider rank for comparison.
just compare salary.
How to add this in where clause with help of case statement.