one of the workaround, copy this formula on H3 and drag it down:

=OFFSET($B$2,0,MATCH(G3,B3:F3,0)-1)