WHEN A MATERNITY case was brought to Solomon, he called for a sword and ordered the baby in dispute to be cut in half. The real mother revealed herself by expressing utter horror at the idea.

Today's electronic Solomon, talk-show host Phil Donahue, presided over a paternity quarrel employing less drastic means: a sophisticated blood test for a baby nobody wanted, a baby born to a surrogate mother. The program where all this unfolded could be a kind of Three-Mile Island for the growing surrogate-parenting movement, which its critics call "rent-a-womb."

Donohue likes to explore the outer reaches of sexual mores. Wolf-gray head down, he prowls among the preening women in his studio audience, hungrily snapping up their views. Are they sorry that truck drivers no longer whistle at them? What do they think of male prostitutes? Transvestites, anyone?

His "surrogate parenting" peep-show brought together an odd trio -- the surrogate mother, her husband and the putative father of the baby. Led by the intrepid Donahue and his hand-held mike, they all went plunging into a thicket of ethical, emotional, and legal considerations of pregnancy by contract, which like the other kind, is a risky business.

Telling their tale to Phil and his 8 million viewers, were Judy Stiver, 26, who is unquestionably the mother of a a month-old, possibly retarded baby, her husband, Ray, and Alexander Malahoff, 46, who denied that he told the doctor to let the disappointing baby die.

The principals have been invading their own privacy ever since the birth of Baby Doe on Jan. 10. The one thing they agreed about, is that they did not want the baby, who was born with a smaller-than-normal head. Ray Stiver, a bus driver, has been telling the world that he did not have sex with his wife during the proscribed period before she was artificially inseminated with Malahoff's sperm. Malahoff has been broadcasting his certainty that the baby was not his, not because it is abnormal but because early tests showed a different blood-grouping. Malahoff, who had agreed to pay Ms. Stiver $10,000 on delivery of the baby, wanted his money back.

They have filed suits. Malahoff is asking $50 million of the Stivers. They are suing the doctor who made the arrangements. But where some people would go to court, the Stivers and Malahoff went to Phil Donahue. The reason? According to a spokesman for the Donohue show, "they all have a strong commitment to the idea of surrogate parenting, and they would all do it again."

Besides, "Phil creates a comfortable atmosphere, where people can speak out."

What drives people to reveal their most intimate secrets to a camera, and through it, to millions of people who may be titillated but not moved by their confidences is not entirely clear. Apparently, celebrity comforts certain souls. Letting it all hang out is tea and sympathy to the participants, who do not observe that some of their viewers find it terminally tasteless.

The Donohue showdown show made all the network news programs, and no wonder. The defense budget cannot compete with the sight of the final news being brought from the laboratory and disclosed live, to the three people whose lives it will forever mark. Malahoff was not the father. Mr. Stiver is the father of his wife's child. The ladies in the audience applauded, as is their custom, when their need to know has been sated. Astonishingly, Ms. Stiver clapped, too, whether out of politeness or a sudden gladness that she could keep the baby she had so recently rejected, she did not say. There's a second segment to come, and we may, if we are not careful, know more later.

The socially redeeming aspect of it all may be that it calls attention to the desperate hunger of America's childless couples. Mr. Malahoff's reason for seeking out a surrogate mother was the worst in the world. He hoped to paste together his faltering marriage, an admission which would have made him ineligible to some surrogate parenting organizations and would have ruled him out for adoption, which has become the forgotten option in the terrible, ongoing row between pro- and anti-abortion groups.

Dr. William Pierce, chief of the National Committee on Adoption, hopes that the Donahue show may set people to thinking about adoption. An estimated 2.5 million Americans have applied for babies. In 1980, some l.55 million abortions, according to the Alan Gutmacher Institute, were performed. Obviously, there is less supply than demand. But Pierce believes that as a first step, instead of screaming at each other, pro-life and pro-choice groups should sit down at the negotiating table and figure out ways to make adoption a more appealling alternative to abortion and surrogate parenting.