Try this:
=INDEX(E$1:I$1,1,IF(SUM(IF(E2=F2:I2,1,0))=4,1,MATCH(MIN(F2:I2),F2:I2,0)+1))
Entered as array formula by pressing CTRL+SHIFT+ENTER in Cell J2
It should look like this:
Then just copy it to the remaining cells.
Hope this is what you want.