title: How to create a new column based on conditional statement in Teradata query report?
body: <p>My table contains a column named "notes". I need to create a column <code>Temper</code> in my report.  If I spot a word "angry" in the notes, then my new variable <code>Temper</code> should be <code>3</code>. If I spot a word "indifferent" then <code>Temper=2</code>, otherwise <code>Temper</code> should equal to <code>0</code>.</p>
  
  <p>The initial table:</p>
  
  <pre><code>Id  State  Gender  Notes
  1    IL     M      Kind of angry, but...
  2    MI     F      Maybe indifferent also...
  3    IL     F      Was cool but not necces...
  </code></pre>
  
  <p>The result should be like this:</p>
  
  <pre><code>    Id      Temper
      1          3
      2          2
      3          0
  </code></pre>
  
  <p>I am not sure how to do this in Teradata environment:</p>
  
  <pre><code>select Id, (notes like '%angry%')=3 else // ?????
  from customers
  where
  case
  </code></pre>