The correct option is B Had
Past tense modal "could" is used to talk about wishes for the future. So, option A is incorrect.
The given sentence is an unreal conditional sentence with inversion. It refers to an action in the past. So, the formal past participle "had" in option B is the correct answer.
"Was" in option C is the past participle of the verb 'be'. It is not required in the given sentence.
"Were" in option C is used to indicate second person singular past, plural past, and past subjunctive of be.
Thus, option B is correct.