----------------SELECT TOP 1 EmpID, EmpWageFROM EmpdetailsWHERE Empwage <>(SELECT TOP 1 EmpWage FROM EmpDetailsORDER BY EmpwageDESC)ORDER BY EmpwageDESC-------------------This code works. But how to get fourth last Empwage ie Lucky103;3000? Is there any simple code here?

The rowNumber is determined based off the row_number() function and it will be in the order of whatever is specified by the order by clause of that function. So yes, you asked for the 4th empWage so that is why the rowNum = 4. If you want the 6th then the rowNum would equal 6. Check out the row_number function in books online to see if it will do what you are needing.

EDIT:

Sorry just reread your earlier post. You say you won't know the wage you will want but then ask for the 6th highest. I am confused as to how you will implement this. You could use a variable in the rowNum = 4 line. Use something like rowNum = @variable. Would that work?