title: SQL select rows conditionally using CASE expression
body: <p>I'm practicing some SQL and I have to retrieve from the database all the information about employees whose (sal+comm) > 1700. I know this can be done with a simple WHERE expression, but we are practicing the CASE statement, so we need to do it that way.</p>
  
  <p>I already know how regular CASE works to assign a new row values dependending on other row values, but I don't understand how to select rows depending on a condition using a CASE expression.</p>
  
  <p>This is what I have achieved so far:</p>
  
  <pre><code>SELECT
      CASE
          WHEN (sal+comm) &gt; 1700 THEN empno
      END AS empno
  FROM emp;
  </code></pre>
  
  <p>I know it's wrong, but I'm stucked here. Any help or any resources to search and read about would be appreciated, thanks!</p>