Correct option is A
Active voice: We elected Ram as president.
Passive voice: Ram was elected as president.
Let’s evaluate the options:
A. Ram was elected as president. ️ Correct
This is the best passive form: Subject becomes object, and "as president" is retained properly.
B. President Ram was elected by us. Technically correct
Acceptable, but focuses more on the title. Less neutral.
C. Ram as president was elected.
Awkward and ungrammatical word order.
D. Who has been elected as president?
This changes the sentence into a question, not a passive transformation.