title: sql statement inside decode clause
body: <p>The decode works like this:</p>
  
  <pre><code>SELECT DECODE('col1', 'x', 'result1','y','result2') resultFinal 
   FROM table1;
  </code></pre>
  
  <p>It possible to accomplish this in sql:</p>
  
  <pre><code>SELECT * 
    FROM (SELECT DECODE('col1', 'x' (someSql),'y',(someOthersql)) result 
            FROM table1)
  </code></pre>
  
  <p>So instead of result1 and result2 being fixed values, they would be sql statements.  If not possible, how can I achieve the same result without a stored proc.</p>
  
  <p>EDIT: someSql and someOthersql are both complex queries with many joins returining many  but same number of cols with same col names.</p>