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 - Get Report), Tenet Health (THC - Get Report) can go higher," Cramer said. "They're not expensive stocks and they're still the ones you want to be in. Universal Health (UHS - Get Report) 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 - Get Report) is a very inexpensive stock and people will ascribe some positives to that, I think that stock can be bought. Cigna (CI - Get Report) is cheapest of the companies that could be acquired, we know there's a suitor which is Anthem (ANTM - Get Report), 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."