title: Return a value instead of a text in CASE Expression
body: <p>I need to output a value in a column instead of a fixed text. I'm using CASE expression, but it's wrong, how can I change it to return another expression.</p>
  
  <p>The Code:</p>
  
  <pre><code>    select serra.CMP_CORTE,
         serra.idc_tubo,
         serra.tip_corte,
  
      ( CASE serra.tip_corte
              WHEN '4'   THEN 'OK'
              ELSE 'NO'
          END
      ) corte_pe,
      ( CASE serra.tip_corte
              WHEN '1'   THEN 'OK'
              ELSE 'NO'
          END
      ) corte_pt
  
  from fl_qts.res_tubo_serra_feixe serra
  where serra.cmp_corte !=0
  </code></pre>
  
  <p>But instead of the <strong>'OK'</strong> value in the <strong>CASE EXPRESSION</strong>, I need to output the value of the <strong>SERRA.CMP_CORTE</strong>.</p>
  
  <p>Look the result:
  <a href="https://i.stack.imgur.com/Rwltr.png" rel="nofollow noreferrer">Result of the query</a></p>