The switch node does not change anything in the msg object. You would need a change node after it attached to the output of the switch node.
I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.
thank you so much
You can use a change node to set a context variable for example flow.myvalue.
Then the switch can compare with the context variable

You solved my problem. Thank you.
