Hi, and welcome to the forum.

First use a helper column E and enter the formula:
=MAX(B4:D4)
in E4 and copy down

Now in A12 enter the formula:

=INDEX($A$1:$A$9,MATCH(B12,E:E,FALSE),1)
and copy down.

HTH