Auto populate field from lookup

Auto populate field from lookup

How auto populate one field when the user select the drop down lookup. I have this code for normal drop down:

if (((input.Arbitros  ==  "Juan")  ||  (input.Arbitros  ==  "Jose"))  ||  (input.Arbitros  ==  "Miguel"))
{
    input.Porciento_de_Descuento = 0;
}
else if ((input.Arbitros  ==  "Richard")  ||  (input.Arbitros  ==  "Michael"))
{
    input.Porciento_de_Descuento = 5;

But I need this same result with drop down lookup field.