title: SQL - Select column and add records based on enum
body: <p>I'm having some trouble figuring out how to set up my query.</p>
  
  <p>I have a simple 2-column table matching an object id(int) to a tag(string). There's also a legacy data-type, object type(int) that I would like to convert into a tag from the query. For example:</p>
  
  <p><code>TAG TABLE := { ID, TAG } : (1, FOO), (1, MINT), (2, BAR), (3, FOOBAR), (5, SAUCY)</code></p>
  
  <p><code>OBJECT TABLE := { ID, ..., TYPE } : (1, ..., 0), (2, ..., 0), (3, ..., 1),(4, ..., SAUCY)</code></p>
  
  <p>And the types transfer to tags in the following way (again, an example)</p>
  
  <p><code>[ 0 -&gt; AWESOME ], [ 1 -&gt; SUPER]</code></p>
  
  <p>So my goal is to make a query that, using this data, returns:</p>
  
  <p><code>RETURN TABLE := { ID, TAG_NAME } : (1, AWESOME), (1, FOO), (1, MINT), (2, AWESOME), (2, BAR), (3, FOOBAR), (3, SUPER), (4, SAUCY), (5, SAUCY)</code></p>
  
  <p>How would I go about setting this up? I tried using case statements for the object type but couldn't get the query to compile... I'm hoping this isn't too tough to create.</p>