title: Use switch case in MVC view
body: <p>In MVC view I have a 'for' command that in each value I want to write specified tag.</p>
  
  <p>I show you a simple case here:</p>
  
  <pre><code>@for (var i = 0; i &lt; 4; i++)
  {
      &lt;div&gt;
          @(switch (i)
          {
              case 0: ??? //write "&lt;div&gt;Custom Value 1&lt;/div&gt;"
                       break;
              case 1: ??? //write "&lt;span&gt;Custom Value 2&lt;/span&gt;"
                       break;
          })
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>I use MVC4 Razor view.</p>
  
  <p>Thanks for your time in advance.</p>