A 5-4 vote along ideological lines by the Supreme Court to overturn part or all of Obamacare would be extremely polarizing for the country, but this is probably the result that President Obama is longing for. Let's look at the possibilities:
1. Obamacare upheld: conservatives and independents are mobilized and boatloads of money pours in to overturn the law. Left-wingers are pleased and feel lower sense of urgency.
2. Obamacare overturned by 6-3 decision or higher: Left-wingers are outraged but the decision is broad enough that most people are satisfied.
3. Obamacare overturned by 5-4 vote along ideological lines: Obama gets rid of the Obamacare issue that has been plaguing him since he signed it, his base is mobilized, and he gets to campaign against the evil conservative justices who overturned the "will of the people".
It's easy to see that option #3 is the best for the President.