Supreme Court, Congress, State Court?
Or would there be no ruling?
If a President issued a self-pardon, and later was charged with an offense covered by the pardon, the former President would presumably assert the pardon as a defense. At that point the court would have to rule on the validity of the self-pardon.
Since Presidential pardons only cover Federal crimes, this would presumably occur in a US Federal District Court. Such a decision could then be appealed to a Circuit Court of Appeals, and from there to the US Supreme Court, which might or might not hear the appeal. So the decision would be made at some level of the US Federal court system, by a US Judge or Judges or the Justices of the Supreme Court. This being a previously undecided question, it is not unlikely that the Court would choose to hear such a case.
But no such ruling would occur unless Federal charges were brought for an act nominally within the hypothetical self-pardon, and the pardon was raised as a defense.