Probably best with a table of possible return options, then use sumif instead.

Like this, assuming this starts from cell A1 and your target cell is C5:

A 1

B 2

C 3

D 4

In your result cell you'd put =sumif(A1:A4,C5,B1:B4).

So B would return 2, D would return 4 etc. Then you can sum the total of the results.