title: Check if user input is a number and then select from switch to print
body: <p><strong>Code:</strong></p>
  
  <pre><code>[int]$s = Read-Host "Enter number from 1-3"
  switch ($s) {
    1 { $s = 'Apple' }
    2 { $s = 'Melon' } 
    3 { $s = 'Mango' }
  } 
  $s 
  </code></pre>
  
  <p><strong>Output:</strong> </p>
  
  <blockquote>
    <p>Cannot convert value "Apple" to type "System.Int32". Error
    input was not in correct format.</p>
  </blockquote>
  
  <p>So my question is: How do I check if my input is a number and at the same time select from my switch?</p>