The only way to match alternative strings in the event header is to use either a custom identifier (returning "*" conditionally) or regex. Here's an example of the latter:
Code:
alias _prefix return -!.

alias transmit {
  if ($1 == !) { msg $chan $2- }
  elseif ($1 == -) { msg $nick $2- }
  elseif ($1 == .) { notice $nick $2- }
}

on $*:TEXT:$($+(/^[,$_prefix,]test/iS)):#my-chan:{
  transmit $left($1,1) Test was a success!
}