title: Switch between different parameter values with string comparison using jenkins pipeline
body: <p>How can I switch between a parameter with different choices with a string comparison?</p>
  
  <p>I have something like this:</p>
  
  <pre><code>#!/usr/bin/env groovy
  pipeline {  
  agent any
     stages {
          stage ('Class') {
          steps {
              script{
                  switch(env.class) {
                     case { if ("${class}" == "a") }:
                          echo "match"
                      break
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>In my jenkins job, I have a <code>string parameter</code> called <code>class</code> which is different for different jobs.
  For this, If <code>${class}==a</code>, I want to do some steps. 
  Someone, please let me know how I can achieve this
  Thanks</p>