title: SQL CASE WHEN won't meet condition
body: <pre><code>select salary as SecondHighestSalary
  from Employee
  where salary = case 
      when (select count(*)
           from Employee) &lt;= 1 then null
      when (
          select count(*)
          from Employee
      ) &gt; 1 then (
          select salary
          from (select salary
                from Employee
                order by salary desc
                limit 2
          ) as two_highest_salary_table
          order by salary asc
          limit 1
      )
      end;
  </code></pre>
  <p>This is a solution to one of the leetcode problem. It is asking me to output the second highest salary from the table and if there are no second highest salary then the output should be null.</p>
  <p>The above is my solution. I used case and when syntax but the problem is that even when the table only has 1 row, it doesn't output a table with a NULL value but it just output a table w nothing in it.</p>
  <p>How can I fix this problem?</p>