One writer said the original quotation was ungrammatical. I'm guessing from the name in the sentence (and the user name of the OP) that this question might not originate in the United States or Great Britain. I live in a part of the U.S. now where I don't meet many people whose families come from India, so I can't easily confirm what I think is the most likely explanation: that Is not your name Ram might be acceptable for many English-speakers. (Actually, I just remembered there's a student where I work now who comes from Gujarat; perhaps I can ask her in the next few days, not that a no would prove anything.)
There are several ways I might interpret the original question. It might be a rhetorical question: The speaker already knows that the person's name is, indeed, Ram.
But Murali! I cannot break down the door!
Come now. Is not your name Ram?
(Sorry, that was bad.)
It might not be that strong, though: Perhaps the speaker is only fairly sure that the person's name is Ram and doesn't mind being direct. Maybe Ram works in a restaurant with a lot of other people; maybe the manager doesn't know everyone. She says, "Isn't your name Ram? Yeah? Go help Jim over there with those boxes." (From here on, I'll assume Is not your name and Isn't your name are the same question.)
I'll put it this way: Let's say I'm a tutor meeting Ram for the first time. We're meeting at the library. I see someone who looks like he's waiting; he has a book for the subject we're covering. (Maybe even we're in the southern U.S., and he's the only Indian guy in the place.) I would not walk up to him and ask, "Isn't your name Ram?" It's too direct. I would ask, "Is your name Ram?"
Of course, the utterance itself Is your name Ram? suggests that the speaker may have some idea about the answer. (The speaker may not, of course, but in general, there's going to be a reason for asking the question.) But it does not convey that idea nearly as strongly as the form in question. All things being equal, it's the most neutral form of the question.
So we have to pick one of the choices.
Option (D), He narrated him if name was not Ram, doesn't work because narrate is not, as far as I'm aware, a ditransitive verb. That is, it doesn't take two objects as, for example, give does: I gave her the book.
Option (D) also has a problem shared by option (C), He said to him if his name was not Ram: Neither narrate nor say can take an adverbial clause as a complement. This is because they are both transitive verbs and therefore need a direct object i.e., a noun. For example,
He said who we was looking for.
He narrated what happened next.
(The to him in (C) sounds stilted to my ears, but I'm not sure I can say with conviction that it's wrong in American English. I think I'd say, "He told him, etc.")
So it's down to (A), He asked him if his name was Ram, and (B), He inquired whether his name was not Ram. (B) better preserves the nuances of the original question, whereas (A) converts it to the neutral form. In (B), the writer merely reports what was said, letting the reader decide what the speaker meant or, indeed, leaving the reader as clueless about the speaker's intentions as the writer himself may be. If we're looking at the question literally, (A) changes what was said.
As for the verb: Is inquire better than ask? It depends on the context. Again, inquire sounds a bit stiff to me. But I don't know what context this speech is being reported in; the writer may say to himself (hey, there's a say + indirect object thing!) that ask is too informal.
And finally: if or whether? There's a school of thought that says if it's a yes-no question, go with whether. (And again, the extra syllable might suggest less, uh, levity.)