anyone help me with the following formula

Basically a1 has the following, WO, WL, OT, S, WS, A, WO, WL
and a2 has the following sums next to the above 2.5, 1.2, 3.4, 4.8, 7.7, 1.1, 2.5, 1.0

i want to basically work out if a1 = WO or WL then give them the total sum.

this would give us a result of WO & WL = 7.2