Jerry Wagshal thought he deserved a million-dollar legal fee for winning a landmark case that forced the Nixon administration to release 552 million to the nation's community mental health centers.

Instead he learned the capriciousness of taking cases on a contingency basis - especially against the government. The Court of Appeals reduced his original fee award of $62.000 to $13.216.25 - only enough "to keep the wolf from the door," he said - because most of the money would come from funds earmarked by Congress to care for the mentally ill.

Suing private industry, though can result in multimillion-dollar fees even in cases similar to Wagshal's where the attorney acting on behalf of a large number of clients.

Gerald Stern, for example, won a $3.5 million legal fee when he won a case against the Pittston Co. for 600 survivors of the Buffalo Creek disaster in which a poorly constructed refuse dam burst. The survivors were awarded $13.5 million, from which he and the law firm he was then associated with. Arnold and Porter, could get their fee.

Another lawyer who struck it rich with an 8 1/2-year-long contingency case on behalf of the nation's users of antibiotics was David I. Shapiro, once a law partner of Charles Colson.

His legal fee totaled $7.5 million after he proved that drug makers had rigged prices on antibiotics. His fee came out of the $100 million pot the drug companies created to pay back the overcharged consumers.

No such pool was created in Wagshal's community mental health center case or in two similar ones in which the government was forced to release almost $600 million and in which the right of Congress to order the Executive to spend money whether it wants to or not was upheld.

Despite the landmark nature of the three decisions, the U.S. District Court here awarded Wagshal a total of $277.375 in fees - far less than he thought be deserved. On appeal by the government the U.S. Court of Appeals lowered the fee in two cases to $38.000: Fee fee award in the third case is still on appeal.

Wagshal insisted in his briefs before the Supreme Court, which refused to hear two of his fee cases that the deserve at least as much money from the government as he would get as a corporate attorney or from a suit against private industry.

In a commercial setting," Wagshal said in an interview, "these cases would have yielded fees of $2 million to $3 million. Awards of generous fees are necessary to encourage socially important litigation."

The continuing argument over Wasgshall's fees raises the major question of whether lawyers are overpaid.

"I think one of the big problems in the profession," said U.S. District Judge Gerhard A. Gesell in the commanity mental health center case, "is the lack of attention to what can be done to reduce the cost of litigation, particularly to the middle class group of people who are really barred from our courts in many ways."

"Some legal fees are excessive," Judge Gesell added in his formal opinion.

While lawyers across the nation do not earn as much as other professions, especially doctors, attorneys who represent major corporations or who win negligence cases in which they can get as much as 40 per cent of the settlements are among the highest said professionals in the country.

Washington lawyers, who smooth the relations between government and their clients around the country, are among the highest paid of all attorneys.

Whele lawyers zealously guard their income, one tax specialist here estimated that at least 500 attorneys in Washington earn more than $100,000 a year. Beverly C. Moore, an attorney specializing in public interest cases, estimated Washington's lawyers' incomes total between $300 million and $600 million a year. When he was appointed Secretary of Health, Education and Welfare, Joseph Califfano disclosed that he made $555.000 from his law practice last year.

"I couldn't afford me. I couldn't afford any lawyer I know. Only corporations can afford us." said one Washington lawyer who represents major companies.

With that kind of money available to corporate attorneys. Wagshal asserted that lawyers have to be well paid to take risky public interest cases.

he took his three health cases in 1973 using the same kind of contingency and class action arrangements that both Stern and Shapiro did.

Even though he won the cases, all the courts finally allowed him was the "front money" he took at what he said was a rdduced rate of $35 an hour.

Both judges who heard his arguments in District Court - Gesell and Thomas A. Flannery - armed that Wagsahl deserved more money than that, althought they did not agree that he should get more than a coporate attorney.

In public interest cases said Flannery, the fee "must not appear to be unreasonably great to the public."

Gesell chastized Wagshal for asking for money from community mental health centres themselves since they "need the money for more worthwhile things."

The judge later told Wagshal. "I have always thought that a professional man had an obligation to do some free service for his community and had some obligation in the public service to make sacrifices, and I don't understand I don't unerstand why a practicing lawyer is any different than anyone else in that regard."