NEW YORK (TheStreet) -- By a 6-3 vote, the U.S. Supreme Court's ruling Thursday on Obamacare handed President Obama a victory, and gave investors an opportunity in the health care space. The nation's highest court rejected a challenge to the use of federal subsidies in Obama's Affordable Care Act, also known as Obamacare.

Health care stocks surged on the news, and may move higher still, according to Jim Cramer, portfolio manager of Action Alerts PLUS. Jim said hospital stocks in particular stand to benefit.

"There's been some suggestions that the hospitals would get hurt by this because the hospitals need more volumes. Now that this is out of the way, HCA (HCA), Tenet Health (THC) can go higher," Cramer said. "They're not expensive stocks and they're still the ones you want to be in. Universal Health (UHS) moved too much this morning, I would stay away," he added.

Cramer also pointed to some opportunities in insurance stocks.

"I do think UnitedHealth (UNH) is a very inexpensive stock and people will ascribe some positives to that, I think that stock can be bought. Cigna (CI) is cheapest of the companies that could be acquired, we know there's a suitor which is Anthem (ANTM), but I don't want to lump those in with hospitals, which have been big winners, and the volume is going to continue, it's not going to drop back, it's perfect."

Meantime, the Supreme Court decision was applauded by President Obama, who made a statement outside the White House shortly after the ruling.

"We finally declared in America that health care isn't a privilege, but a right for all," said President Obama. "After multiple challenges before the Supreme Court, the Affordable Care Act is here to stay."

U.S. House Speaker John Boehner said Republicans have not decided whether to again attempt to repeal the healthcare law, adding "Obamacare is fundamentally broken."

More from Investing

Tesla's Supercharger Network Is Booming -- Here's Why That's a Concern

Tesla's Supercharger Network Is Booming -- Here's Why That's a Concern

After PayPal Buys iZettle, Pay-Tech Firms Could Process These Deals

After PayPal Buys iZettle, Pay-Tech Firms Could Process These Deals

Attention 60 Minutes: Google Isn't the Only Big-Tech Monopoly

Attention 60 Minutes: Google Isn't the Only Big-Tech Monopoly

Tesla CEO Elon Musk Is a Rock Star: Kiss Icon Gene Simmons

Tesla CEO Elon Musk Is a Rock Star: Kiss Icon Gene Simmons

Macy's Vs. J.C. Penney: Which Department Store Is Just Trying to Survive?

Macy's Vs. J.C. Penney: Which Department Store Is Just Trying to Survive?