I feel there's a simpler way, but this array (confirm with CTRL, SHIFT and ENTER) will do it:

=INDEX(B1:B20,MAX(ROW($1:$20)*(A1:A20=1)))

where you're looking for the last occurrence of 1.

Adjust ranges and the row limits to suit your data.