Basically, bills passed by Congress and enacted into law must be regarded by the Office of the President as Constitutional until such time as the Courts determine otherwise. The man (or woman) who holds the office may
personally believe the law is not Constitutional, but is still bound to act
officially as though it
is Constitutional in the absence of a Court ruling, even if "common wisdom" says it is clearly not Constitutional. Note that the President
does have latitude to determine
how the law will be enforced. So, the President should not be
officially defending or condemning any particular even if he, as a citizen, has strong opinions on the matter. He is free to state his
personal opinion on the matter under the First Amendment, but should not use official Presidential assets or symbols when doing so.
Yes, there is a history of Presidents choosing to enforce some laws and not others. Technically, that can be considered a violation of the duties and intent of the Office, but in practice there is not much anyone can do about it unless the President's behavior rises to the level of an Impeachable Offense in the eyes of Congress, in which case they may elect to vote on whether to Impeach him and Remove him from Office (two separate actions).
If
I pick and choose which of my employer's requirements I choose to meet, I get fired. Apart from Impeachment and Removal from Office, normally reserved for the most heinous actions, there is no analogous punishment for the President.
I believe DOMA is Unconstitutional and needs to be thrown out by both Congress and the Courts, but I also believe the President should not state any official position on the matter, and keep his personal opinions in the realm of private citizen expression only.
(In the event we elect a non-male President of any other gender identity, adjust all pronouns accordingly.

)