Using variables in when condition

Nope.

Closest is to put all likely suspects in a Group (potentially all Items) and then check in the then section for “who triggered”, ignoring unwanted ones. The comparison can be between Item name and a variable.

Can’t put Things in a Group though …
there’s a Thing event handler here that might interest you

It works around OH2 limitations, and should be easier to implement in OH3