So z.B.

Dim A as Byte
A="Empfangenes Zeichen"
Select Case A
Case 1: toggle Port x.x
Case 2: toggle Port y.y
usw.
end select