The correct option is A had
The clause 'I ______ some errands to do' describes a simple action in the past.
Option A: 'Had' is a simple past verb and describes an action that was completed in the past.
It relates to the given sentence; hence option A is correct.
Option B: 'Had had' is in the past perfect tense. It describes an action that was completed just before another one commenced. In this sentence, the events do not happen one after the other 'Qadir came to have lunch' 'but I had some errands'.
Hence B is incorrect.
Option C: 'Was having' is in the past continuous tense. It describes a continuous action in the past. The given sentence does not describe a continuous action.
Option D: 'Were having' is the same as 'was having'. The difference being that 'were' is a plural verb. The verb must agree to the subject in number, and since 'I' is singular, the verb must also be singular.
Hence options C and D are incorrect.