InterruptPin to change If statement

I’d like to change tasks using an interrupt pin. Basically, I want to query 4 button at the same time as the interrupt. For instance:

//inputs would have INPUT_PULLUP set so LOW would trigger the event.

if (interruptPin && inputPin1 == LOW) {then change to this part of the loop}

if (interruptPin && inputPin2== LOW) {then change to this part of the loop}

if (interruptPin && inputPin3 == LOW) {then change to this part of the loop}

if (interruptPin && inputPin4 == LOW) {then change to this part of the loop}

How should I setup my code/interrupt to check A: that the interrupt happened and B: that the interrupt checks which button went LOW so we know which part of the loop to go to (or maybe go to a function)?..idk

What happens when two buttons are pressed at the same time ? or three, or four ?
Why do you need an interrupt ?
Which Arduino board ?

In the interrupt routine (see attachInterrupt) you read the four buttons with digitalRead(). Then set a variable (make it 'volatile') or perhaps four variables. In the loop, read that variable and if it was active, clear it for the next interrupt. Process the information that came from the 'volatile' variable.

Every buttons bounces. It this some kind of multitasking on a Arduino ? When a button bounches, that could result into a burst of functions calls.

In the Arduino it is (almost) never needed to read a button with an interrupt. When the loop() has no delay(), then there is enough time to check the buttons many times per second.

Have you heard about the XY-problem ? This might be a combination of a XY-problem and not following the KISS rule and not thinking ahead of problems. I hope that we can make things easier when we know what that interrupt is for :wink: