Job opportunities for women on federal and state payrolls throughout the country may depend heavily on the outcome of a controversial case awaiting Supreme Court action.

The case involves the veterans' preference provision in the Massachusetts civil service law that gives former members of the military favored treatment in hiring and promotion. Forty-six other states provide similar preferences; so does the federal government. Recently, Congress retained the federal preference when it passed legislation to overhaul the civil service.

The court will decide whether to review or let stand a 2-to-1 ruling invalidating the Massachussetts preference on the ground that it impermissibly disadvantages women, who make up only a small percentage of veterans.

The decision was by a panel of federal judges who had struck down the same preference before, saying that it denied women the equal protection of the laws guaranteed by the Constitution.

A year ago, however, the Supreme Court nullified the ruling and sent it back to the panel "for further consideration in light of"Washington v. Davis. This was a 1976 ruling that the discrimination prohibited by the Constitution must be shown to have been intentional.

The Davis decision involved the written civil service examination for applicants to the Metropolitan Police Department of the District of Columbia, which had made affirmative efforts to recruit blacks; they accounted for 44 percent of the recruits in a three-year period.

This factual background is "entirely different" from that in the preference case, where Massachussetts made no effort to mitigate the impact of veterans' preference on women, Judge Joseph L. Tauro wrote in the opinion for the panel majority.

Both Davis and the court's 1977 decision in a related discrimination case support the panel's original conclusion that the preference is unconstitutional, Tauro said.

The law "permanently prevents a nonveteran from achieving a place on the civil service appointment list ahead of a veteran, regardless of comparative test scores," Tauro wrote. He said the root of the situation is longstanding federal policy of taking so few women into the armed services that they account for only 2 percent of Massachusetts veterans.

Thus, Tauro said, "few women will ever become veterans so as to qualify for the preference; and so few, if any, will ever achieve a top position of a civil service eligibility list for other than positions traditionally held by women."

Tauro said the legislature had a legitimate and rational purpose - rewarding military service - for the preference. But, he said, in "intentionally sacrificing the career opportunities" of 98 percent of the state's women to benefit Veterans, the legislature adopted means that were not legitimate and the rational - especially because of the availability of "less drastic alternatives," such as a point system based on length of military duty.

Joining Tauro in a separate opinion, Judge Levin H. Campbell said that if the Massachusetts preference is left standing, the equal-protection guarantee will be, "in this area of employment, little more than a hollow pretense. . . "

Of course the legislature's purpose wasn't to hire women, Campbell wrote. "But", he said, "the cutting off women's opportunities was an inevitable concomitant of the chosen scheme - as inevitable as the proposition that if tails is up, heads must must be down. Where a law's consequences are that inevitable, can they be meaningfully described as unintended?"

In the dissenting opinion, Judge Frank J. Murray said the legislature's purpose was to help veterans - not nonveterans - regardless of sex. Mere awareness that men would be the chief beneficiaries "is not proof of discriminatory intent," he wrote. Moreover, he said, the record is barren of claim that the preference wouldn't have been adopted if it would have benefited both sexes equally.