Two pushbuttons using switch case

I have two pushbuttons that will control lcd display. Pushbutton1 will be displaying one info, once button2 is pressed the display will shift to display another info.
I want to use switch case for this. Case one when button1 is high will print display info#1, button two will print display #2.
This is what I have so far, and of course it is not working..

#include <LiquidCrystal.h>




int button1= 18;
int button2 = 19;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
 
void setup(){
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  lcd.begin(20, 4);
  
}

void loop(){
  
  int state = HIGH;
  int one = digitalRead(button1);
  int two = digitalRead(button2);
  switch(state){
    case one:
      lcd.print("screen1");
      break;
    case two:
      lcd.print("screen2");
      break;
      default:
      lcd.print("not working");
  }
}

I want to use switch case for this

Why?

Because I tried using If...else statements and it didn't work.
This is what I had before:

#include <LiquidCrystal.h>

int buttonPin1= 18;
int buttonPin2 = 19;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int prevButtonState1;
int prevButtonState2;
void setup()
{
  pinMode(buttonPin1, INPUT);
  pinMode(buttonPin2, INPUT);
  lcd.begin(20, 4);
  lcd.print("Hello");
}


void loop(){
  int buttonState1 = digitalRead(buttonPin1);
  int buttonState2 = digitalRead(buttonPin2);
  if (buttonState1 == LOW && digitalRead(prevButtonState1)== HIGH){
    lcd.setCursor(0,0);
    lcd.print("Displays time and distance");
    delay(2000);
    lcd.clear();
    buttonState1 = prevButtonState1;
  }
  else if(buttonState2 == LOW && digitalRead(prevButtonState2)== HIGH){
    lcd.print("Displays velocity and altitude");
    delay(2000);
    lcd.clear();
    buttonState2 = prevButtonState2;
  }
    else{
    lcd.print("not working");
    delay(2000);
    lcd.clear();}
   
}

The problem with this code is it's not responding when I push either of the buttons. It displays Hello, and after the delay goes straight to the output of what supposed to be triggered by a button.

#include <LiquidCrystal.h>

int buttonPin1= 18;
int buttonPin2 = 19;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int prevButtonState1;
int prevButtonState2;
void setup()
{
  pinMode(buttonPin1, INPUT);
  pinMode(buttonPin2, INPUT);
  digitalWrite(buttonPin1, LOW);
  digitalWrite(buttonPin2,LOW);
  lcd.begin(20, 4);
  lcd.print("Hello");
  delay(2000);
}


void loop(){
  int buttonState1 = digitalRead(buttonPin1);
  int buttonState2 = digitalRead(buttonPin2);
  if (buttonState1 == LOW && prevButtonState1== HIGH){
    lcd.setCursor(0,0);
    lcd.print("Displays time and distance");
    delay(2000);
    lcd.clear();
    prevButtonState1 = buttonState1;
  }
  else if(buttonState2 == LOW && prevButtonState2== HIGH){
    lcd.print("Displays velocity and altitude");
    delay(2000);
    lcd.clear();
    prevButtonState2 = buttonState2;
  }
    else{
    lcd.print("not working");
    delay(2000);
    lcd.clear();
    prevButtonState1 = buttonState1;
    prevButtonState2 = buttonState2;
 }
   
}

This is my updated code. It does part of the job. It responds to the button presses. But it will display the message for 2sec and delay and then will go the default "not working" message. I want all of the messages ("Hello", "display time and distance", " display velocity and altitude") to stay there untill Arduino senses another press of a button to change to a different screen.

1. You know what you want to do when you see a newly pressed button 1, and you do it. right? Well, not really. Why do you clear the screen after two seconds? You want the message to stay there until something interesting occurs (a new button 2 press, for example).

2. You know what you want to do when you don't see a newly pressed button 1 and you do see a newly pressed button 2, and you do it right? Well, not really. Why do you clear the screen after two seconds? You want the message to stay there until button 1 is pressed.

3. If neither of these happens, what do you want to do to the display?
No new button press means: Do Nothing, right? I mean, you want whatever message is on the screen to stay there, right?
Well, why do you print "not working" and then clear the screen when this happens?

Regards,

Dave

THANK YOU!
I have been sitting in front of comuter for hours, and when you're tired you make the dumbest mistakes! thanks again it does exactly what i want now..

updated code

#include <LiquidCrystal.h>

int buttonPin1= 18;
int buttonPin2 = 19;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int prevButtonState1;
int prevButtonState2;
void setup()
{
  pinMode(buttonPin1, INPUT);
  pinMode(buttonPin2, INPUT);
  digitalWrite(buttonPin1, LOW);
  digitalWrite(buttonPin2,LOW);
  lcd.begin(20, 4);
  lcd.print("Hello");
  delay(2000);
}


void loop(){
  int buttonState1 = digitalRead(buttonPin1);
  int buttonState2 = digitalRead(buttonPin2);
 
  if (buttonState1 == LOW && prevButtonState1== HIGH){
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Displays time and distance");
    prevButtonState1 = buttonState1;
  }
  else if(buttonState2 == LOW && prevButtonState2== HIGH){
    lcd.clear();
    lcd.print("Displays velocity and altitude");
    prevButtonState2 = buttonState2;
  }
    else{
    prevButtonState1 = buttonState1;
    prevButtonState2 = buttonState2;
 }
   
}

Because I tried using If...else statements and it didn't work

if...else is the right choice for what you're trying to do.

I want all of the messages ("Hello", "display time and distance", " display velocity and altitude") to stay there untill Arduino senses another press of a button to change to a different screen

It sounds like you need a "state machine" with three states. Button clicks cause a "state transition". In each state, the appropriate message (and variables?) are displayed.

Do those hints move you in productive direction?