title: How to select data from a table with a condition?
body: <p>I have a table just like following,</p>
  
  <pre><code>ID    |   dataCol
  ------------------
  1          text1
  2          text2
  3          text3
  </code></pre>
  
  <p>I want to select all the data in above table with a condition such that if any row dataCol value is equal to 'text2' it should print as 'text4'.</p>
  
  <p>my pseudo code is follows,</p>
  
  <pre><code>  select ID, (
  if dataCol is equal to 'text2' 
  then
   print 'text4'
   else
   dataCol
  ) from table1;
  </code></pre>
  
  <p>final out put should be like,</p>
  
  <pre><code>ID    |   dataCol
  ------------------
  1          text1
  2          text4
  3          text3
  </code></pre>