This is probably "The Satanic Son of Superman", printed in Action Comics #410 in 1972. The portion you're remembering is actually a very small segment of the issue, serving as a backstory for the issue's villain (Superman's son's evil twin, and no I'm not making that up).
Superman falls in love and gets married
Relevant transcript:
But as you suspend your monumental burden in space, Superman, your troubled mind wanders once again...through the misty realms of cherished memories to a happier time, years ago...
When you and your young wife were discussing the future of your soon-to-be-born child...
Krysalla: Darling, there's something about myself I must tell you...something I'm afraid might...affect our baby!
Neither actually shown, but check
His wife turns out to be a witch
Relevant transcript:
At first you wouldn't believe your eyes as she backed away from you...
Krysalla: I...I am a witch. See?
She dies in childbirth, gives Superman a son, Superman is holding the baby crying
Relevant transcript:
Doctor: I'm sorry, Superman! We tried everything possible to save her! But your newborn son is alive and healthy!
It was a what-if
Relevant transcript:
The end of an imaginary story that hasn't happened yet -- but who can tell? Someday it might!