title: MySQL Select Multiple in IF statment
body: <p>I return a value if only one row matches my where condition,</p>
  <pre><code>SELECT IF((SELECT COUNT(1) FROM UserWins WHERE Wins = (select max(Wins) from UserWins)) = 1, (SELECT UserId FROM UserWins WHERE Wins=(select max(Wins) from UserWins)), null)
  </code></pre>
  <p>This works fine as long as I only want to select one column, if I try to return more it fails with &quot;Error #1241 - Operand should contain 1 column(s) in Mysql&quot;. I understand the error but I'm unsure what is the best way to do this,</p>
  <p>I can summarise this down to</p>
  <pre><code>SELECT IF(TRUE, (SELECT UserId, Nick FROM UserWins), null)
  </code></pre>
  <p>Would appreciate any input.</p>