In the Supreme Court of the United States, the Justices typically recuse themselves from participating in cases in which they have financial interests.–Wikipedia
I am not aware of an instance when a Justice chose to recuse due to nomination by a certain President.
Supreme Court Justices, once appointed to life terms, are supposed to be immune to improper influence. This assumption is false if Justices do act in the interest of the President who nominated them or their political party. Could a Justice nominated by President Trump rule on a case in which Trump is a defendant? The answer may well be yes. It would be up to the Justice to decide. In the Nixon tapes case, Chief Justice Warren Burger and Justice Harry Blackmun, both nominated by Richard Nixon, participated.