title: is there any function in Hive similiar to decode in Oracle?
body: <p>I'm looking for a string function that works like Oracle's DECODE
  Having table <code>tab</code> with a single column <code>col</code></p>
  
  <pre><code>col
  ----
  a
  b
  c
  d
  </code></pre>
  
  <p>With a simple query:</p>
  
  <pre><code>select decode(col,'a',1,'b',2',9) dec from tab
  </code></pre>
  
  <p>I'd expect result like this:</p>
  
  <pre><code>dec
  ---
  1
  2
  9
  9
  </code></pre>
  
  <p>I haven't found any build-in function in Language Manual. Is there any UDF that can simulate DECODE?</p>
  
  <p>I don't want to use <code>case</code> clause.</p>
  
  <p>Regards<br>
  Pawel</p>