Create mapping "database" to produce output

I am fairly new to this, but was hoping someone could help out.

I am looking for a way to take variances in room names and output a standard name.

Example 1:

Room names - Corridor, Corr, Passage
Result = Corridor

Example 2:
Room names - Exam 1, Exam 2, Exam 3
Result = Exam

Thank you in advance!

You could do something like this: