Could can either have a past meaning (=was able to) or a conditional meaning (=would be able to). For example, in the sentence "When I was younger I could run five miles", "could" means "was able to" and serves as the past tense of "can".
As you know, in the Second Conditional, the simple past is used in the condition clause, while "would" +infinitive is used in the result clause, e.g. "If I were hungry, I would eat a sandwich".
Even though the simple past is used in the condition clause (with the caveat that "were" is sometimes substituted for "was"), it doesn't describe past time here, but a hypothetical situation (specifically, one that isn't in the past).
So, because "could" serves as the past of "can", "If I could..." means "If I were able to...", imagining a hypothetical present/future in which you could do something.
The following sentence therefore fits the Second Conditional paradigm.
If you could have anything right now, what would you want to have?
This is not to say that all conditional sentences fit squarely into one of the paradigms taught to learners. Those numbered conditionals are a simplification designed for teaching purposes.