SELECT IF(SUM< 1, NULL, s) AS salary FROM (SELECT salary AS s, COUNT(salary) AS SUM FROM Employee ORDER BY salary DESC LIMIT 1, 1) sub
Your inner query has aggregate function
COUNT, so only one row of each group (if has
GROUP BY) will be returned and of course no second row.
I think your inner query should be something like
SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT 1 , 1