title: Using case to create a new column MySQL
body: <p>I'm new to SQL and I'm trying to create a new column using values from another column.</p>
  
  <p>I'm using something like this.</p>
  
  <pre><code>Select 
  a.idclientecrm,
  (case
  when a.titulo like '%Mensual'       then 'Mensual'
  when a.titulo like '%Trimestral'    then 'Trimestral'
  when a.titulo like '%Semestral'     then 'Semestral'
  when a.titulo like '%Anual'         then 'Anual'
  else null
  end) as Periodo_Producto
  from tareas a
  </code></pre>
  
  <p>When I find the word <em>Mensual</em> in <strong>a.titulo</strong> I need the word 'Mensual' in the new column and so on for every different time period (<em>trimestral</em>, <em>semestral</em> and <em>anual</em>).</p>
  
  <p>The "like" part doesn't seem to work, I also tried with <strong>contains</strong> but I can't make it work either.</p>
  
  <p>Hope it's understandable.</p>