title: Subquery returns more than 1 row when subselecting in a CASE WHEN statement
body: <p><strong>First query</strong></p>
  
  <p>This query works fine and the engine does not complain about it</p>
  
  <pre><code>SELECT id 
  FROM agencies
  WHERE id IN ((SELECT id FROM agencies))
  ORDER BY id;
  </code></pre>
  
  <p><strong>Second query</strong></p>
  
  <p>This one does not work, the engine is complaining about <code>Subquery returns more than 1 row</code>, when -according to me- I am doing the exact same thing when <code>@param_1 IS NULL</code></p>
  
  <pre><code>SELECT 
    @param_1 := NULL,
  
  SELECT id 
  FROM agencies
  WHERE id IN (CASE WHEN @param_1 IS NULL THEN (SELECT id FROM agencies) ELSE 1 END )
  ORDER BY id;
  </code></pre>
  
  <p>Does anybody see why the engine is complaining about the second query when it isnt for the first query ?</p>
  
  <p>Thanks in advance,</p>