Regarding use of switch case

I am doing a project with Arduino. I want to know how to use switch case in arduino programming as i m using two sensor. So when i press one in serial monitor it should show reading of 1st sensor and same for 2nd. So can you please help me with the code as i am not able to do it. I am using two soil moisture sensor. Thank You.

switch(someVar)
{
  case '1':
    // read sensor 1
    ...
    ...
    break;
  case '2':
    // read sensor 2
    ...
    ...
    break;
  default:
    Serial.println("Invalid sensor number");
    break
}

The variable someVar will come from your reading of the serial port; '1' and '2' are the single characters one and two.

With only two cases, a switch/case statement doesn't make a lot of sense.

if(someVar == 1)
{
   // do the one thing
}
else if(someVar == 2)
{
   // do the two thing
}
else
{
   // do the not one and not two thing
}