title: If condition inside case
body: <p>I'm converting some MySQL 5.0 functions to Oracle 11g.</p>
  
  <p>I need to place an <code>IF</code> inside a case but get an error (missing right parenthesis)
  this is my code</p>
  
  <pre><code>SELECT SUM(
      CASE PTIPO
        WHEN 0 THEN (SELECT IF(A.NT = 0) THEN A.VALOR ELSE 0 END IF FROM DUAL)
        WHEN 1 THEN (SELECT IF(A.NT = 1) THEN A.VALOR ELSE 0 END IF FROM DUAL)
        WHEN 2 THEN (SELECT IF(A.NT = 1) THEN A.VALOR ELSE -A.VALOR END IF FROM DUAL)
      END)
  INTO nresp
  FROM mov_caja a
  JOIN enc_movp b ON a.docid = b.docid
  JOIN c_caja c ON a.cajaid = c.cajaid
  WHERE c.cajaid
  </code></pre>