Just because you’ve called a Switch node an “And Gate” doesn’t mean that it will behave like an And Gate.
I’m still running version 0.20 of Node-Red, so I don’t know how the changes to sequential processing in v1.0 of Node-Red affect things, but certainly in v0.20 it’s not possible to compare two inputs using a Switch node.
To begin with, both inputs aren’t likely to arrive at exactly the same time using your flow, so a method of storing the values is needed.
I’d approach this by storing the values from the two input nodes as variables, then gave a function, which is triggered by the two inputs, which reads and compares the variable values and takes the appropriate action.