title: How to join table with result column in oracle
body: <p>I used case when to get a column named 'code' in oracle. Now I want to get another column from a table which need to be joined with the result 'code' column.
  Example:</p>
  <pre><code>select 
  (case when field='A' then '001'
  when field='B' then '002'
  end) code
  from table_code
  </code></pre>
  <p>Now I want to get another column 'code_name' in this query from table 'names' containing data as</p>
  <pre><code>code: 001= code_name: aa &amp; code: 002= code_name: bb
  </code></pre>