title: Convert if else structure into switch case in swift
body: <p>I am pretty new in programming, I am trying to convert this if else structure into Switch cases in Swift language, i appreciate your help, thanks.</p>
  
  <p>here is my code</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if (segue.identifier == "ShowDefinition") {
          if let destinationViewController = segue.destinationViewController as? EnglishViewController {
              if let definition = sender as? String {
                  if definition == "Abstraction" {
                      destinationViewController.titleMsg = "Abstraction"
                      destinationViewController.definitionMsg = "definition 1"
                  } else if definition == "Binary System" {
                      destinationViewController.titleMsg = "Binary System"
                      destinationViewController.definitionMsg = "definition 2"
                  } else if definition == "Computer" {
                      destinationViewController.titleMsg = "Computer"
                      destinationViewController.definitionMsg = "definition 3"
  
                  } else if definition == "Internet" {
                      destinationViewController.titleMsg = "Internet"
                      destinationViewController.definitionMsg = "definition 4"
  
                  } else if definition == "Virtual Reality" {
                      destinationViewController.titleMsg = "Virtual Reality"
                      destinationViewController.definitionMsg = "definition 5"
  
                  }
              }
          }
      }
  }
  </code></pre>