Source: Wikimedia Commons

The U.S. Supreme Court has rescued the Affordable Care Act enough times that Justice Antonin Scalia commented that perhaps Obamacare should now be called "SCOTUSCare." In a 6-3 ruling on Thursday in King v. Burwell, the court determined that the federal government can continue to provide health insurance subsidies in all states, including those that didn't establish their own insurance exchanges. With the subsidy question settled, there's another big Obamacare question: What should investors do now?

Go to the hospitals?
Immediately after the announcement of the Supreme Court ruling, many investors decided the smart next move was to scoop up shares of hospital stocks. Shares of HCA Holdings (HCA -1.54%), which owns 165 hospitals, jumped nearly 9% on Thursday. Meanwhile, Tenet Healthcare Corp.'s (THC -0.76%) stock soared over 12%.

Euphoria reigned as the prospect for millions of Americans losing health insurance was taken off the table. This certainly is great news for hospitals, who since Obamacare's implementation have seen a decrease in the amount of money lost on treatment of patients without health insurance, but are hospital stocks really a good alternative for investors now?

Tenet has a trailing 12-month earnings multiple of 62. Even if analysts are right that the healthcare company will increase its earnings by 50% this year, the stock seems expensive. HCA's earnings multiple of 19 isn't as scary. However, there are plenty of stocks trading at less expensive valuations with stronger growth prospects. 

It's possible, though, that the Supreme Court ruling could spark more mergers and acquisitions among hospitals by removing uncertainty about the future. If this happens, the big hospital chains might realize economies of scale that find their way to the bottom line, which could drive share prices higher.   

Buy some insurance?
Health insurer stocks also rose following the King v. Burwell decision, but investors weren't quite as giddy about them as they were for hospital stocks. UnitedHealth Group (UNH 1.35%) shares climbed nearly 3% on Thursday, while Anthem's (ELV 1.11%) stock rose over 1% in an otherwise sluggish day for the market.

An adverse ruling would have hurt insurance companies, but it wouldn't have been nearly as painful as it would have been for hospitals. Earnings for the big health insurers aren't as dependent on the Obamacare subsidies helping the individual insurance market. 

Investors might want to look at health insurer stocks -- but not because of the impact of Obamacare subsidies. There is something of a merger and acquisition frenzy under way that has pushed several stocks higher in recent weeks. It's probably too late to experience huge gains by buying the companies that are potentially close to being acquired. However, I suspect that deals could ultimately make the larger health insurers, including Anthem, better positioned for the long run.

Think big picture
If you think the debate is now over for Obamacare, think again. The fires will almost certainly continue to flame into the 2016 elections. While the Supreme Court maintained the status quo for now, political winds could rock the boat down the road.

There are three things you can count on regardless of politics. First, the number of Americans over age 65 is growing. Second, they will need more healthcare. Third, governmental and private payers will scramble to keep healthcare costs from mushrooming.

Hospitals benefit from the first two factors. Health insurers could benefit from all three. But I think pharmacy benefit managers are particularly poised to do well over the long run as a result of these three factors.

The largest stand-alone PBM, Express Scripts (ESRX), should be one of the big winners. Express Scripts' services will likely be in increasing demand for the foreseeable future. The company's scale gives it some competitive advantages over smaller PBMs. It's the kind of stock that investors could buy now and hold for decades.

What should investors do now after the King v. Burwell decision? Think big picture -- whether the U.S. has Obamacare, SCOTUScare, or any other healthcare system.