He asked me if I had been ill.

The correct answer is C. He said to me, “Had you been ill?”

The sentence “He asked me if I had been ill” is in the past tense. This means that the speaker is asking about something that happened in the past. The only option that is in the past tense is C.

Option A is in the present tense. This would be used if the speaker was asking about something that is happening now.

Option B is also in the past tense, but it is the past perfect tense. This tense is used to talk about something that happened before another event in the past. In this case, there is no other event in the past that the speaker is referring to, so the past perfect tense would not be appropriate.

Option D is in the present perfect tense. This tense is used to talk about something that has happened at some point in the past but is still relevant to the present. In this case, the speaker is not asking about something that is still relevant to the present, so the present perfect tense would not be appropriate.