The correct option is C He asked me if I was going with them.
While converting a speech from direct to indirect, the tense changes to past tense (if it is in simple present, it changes to simple past, if it's in present continuous, it changes to past continuous, and so on.) because the event is now being spoken of at a later time.
When a question expects an answer in a 'yes/no/ form, then this type of question is reported in this format: asked + if/whether + clause.
The given interrogative sentence expects a reply in a yes or a no. Option C is in the form: He asked me + if + clause (I was going with them).
('Come' is usually changed to 'go' in reported speech.)
Hence option C is correct.
Option A is still in the same form, in direct speech and question form; only the inverted commas and the question mark have been omitted. While changing from one speech to another, the form has to change. Hence A is incorrect.
In B, only the verb ('are' by 'was') and pronouns ('you' by 'I' and 'us' by 'them') have been replaced, but along with it, the form must also change from a question to a declarative sentence. Hence B is incorrect.
Similarly, option D is still in question form 'was I going with them' hence D is also incorrect.