Why is my voltage less when using this code

Wouldn't it be better to call a switch SW1 SW2 SW3 rather than led1, led2, led3 ?

What exactly are you trying to do here? :o

  for (int i = 2; i < 5; i++)
  {
    if (digitalRead (i) == HIGH)
    {
      digitalWrite(led, HIGH);
    }
    else if (digitalRead(led2) == HIGH)
    {
      digitalWrite(led, HIGH);
    }
    else if (digitalRead(led3) == HIGH)
    {
      digitalWrite(led, HIGH);
    }

    else
    {
      digitalWrite(led, LOW);
    }
  }