I have a table like this

and want to create a new formula column (reference size fruit) where the row value is the value to the Column "Size", but with the condition that the order is 5 and the value updates for each fruit type.
E.g., the result should look like this:

I can do it using a nasty workaround (marking 5 in column "order", select matching values, do a subset using selected rows and update the original table with this) or I could write a JSL script, but I would prefer a Formula column solution for compactness.