title: Oracle CASE statement?
body: <p>I have a stored proc. where i am passing a boolean value e.g. IS_ELIGIBLE. 
  Now i want to be able to write query something like this:</p>
  
  <pre><code>SELECT col1,
         CASE 
            WHEN IS_ELIGIBLE THEN col2 * 100
         ELSE
            col2 * 50
         END
           INTO OUT_COL1, OUT_SCORE
  FROM TABLE_NAME
  </code></pre>
  
  <p>The problem is since IS_ELIGIBLE is not one of the column in TABLE_NAME, the query errors out. I can write the same query using if..else ie.</p>
  
  <pre><code>IF IS_ELIGIBLE
     SELECT col1, col2 * 100
  ELSE
     SELECT col1, col2 * 50
  END
  </code></pre>
  
  <p>But i will be repeating select statement twice. I know i can create the function to have that select statement so that i don't have to repeat twice. But i was just curious if it can be done without doing if..else or creating new function?
  Thanks.     </p>