title: Liquid - switch statement with a variable
body: <p>I have the following situation:</p>
  
  <pre><code>&lt;label for="swatch-{{ option_index }}-{{ value | handle }}" style="background-color: 
          {% capture color %} {{ value | handle }} {% endcapture %}
  
        {% assign handle = color %}
          {% case handle %}
            {% when 'red' %}
               red;
            {% when 'navy' %}
               navy;
            {% else %}
               #f00;
          {% endcase %}
  
  background-image: url({{ value | handle | append: '.' | append: file_extension | file_url }})"&gt;
  </code></pre>
  
  <p>When I do {{color}} it prints the right color, but when I try to use it in a comparison statement it fails, returns blank (or rather the default which is <code>#f00</code>. Same with the IF statement. </p>
  
  <p>If I define the </p>
  
  <pre><code>{% assign handle = 'red' %}
  </code></pre>
  
  <p>then it works fine. </p>