title: Alter table add column with data populated from another column
body: <p>I'm trying to add a column to a table which needs to take a varchar value from an existing column in the table and convert it into an int in an if/then format.</p>
  
  <p>example: </p>
  
  <pre><code>if size = d then size_int = 1
  else if size = f then size_int = 2
  else if size = t then size_int = 3
  else if size = s then size_int = 4
  else if size = m then size_int = 5
  else if size = l then size_int = 6
  else if size = h then size_int = 7
  else if size = g then size_int = 8
  else if size = c then size_int = 9
  </code></pre>
  
  <p>If there is an easier way to do this by first adding the column then altering it that would work too.</p>