The actual version of the
switch node (nodered 3.0.2) accepts, in "Edit switch node' pad, msg.|flow.|global.|string|number|Jexpression|env.variabile|previus value but not credentials.
I am in the (rare) situation of using IOT device IDs as values in a selector.
Throughout my flow the IDs (used as primary key) are always in credentials, especially to be able to export and exchange the flow safely. Except in the switch node.