White-collar government workers could be in line for a 22 percent pay raise this year, plus a multibillion dollar retroactive increase if the American Federation of Government Employees wins a long-shot lawsuit just filed in U.S. District Court here.

The union wants the court to declare unconstitutional one part of the federal pay law that gives the president power to give U.S. employes less than a full catch-up-with-industry raise in times of economic emergency.

Under the law, government employes are supposed to get an annual pay adjustment designed to keep their salaries on par with pay in the private sector. The percentage pay raise they are due is based on a pay survey conducted by the Bureau of Labor Statistics of selected jobs in selected industries.

The president's pay agents--the directors of the Office of Personnel Management, Office of Management and Budget and the secretary of labor--bring that recommendation to the president. But he has the authority to recommend a lesser increase, often on the advice of the pay agents themselves.

That lower amount goes into effect unless either house of Congress vetoes it. If that happens, and it rarely has, feds are supposed to get the full comparabililty increase.

In 1979 the BLS data showed that feds needed a 10.4 percent pay raise to catch up with industry. President Carter gave them a 7 percent raise and Congress did not override it. Next year the comparability raise figure was 13.5 percent. Carter okayed a 9.1 percent raise instead.

The 1981 federal catch-up was supposed to be 15.1 percent. President Reagan said 4.8 percent was more realistic. Congress did not overrule him. Last year feds were told they were 18.5 percent behind industry but Reagan said true comparability demanded only a 4 percent raise.

When the pay figure for this year is released this month it could call for a raise of around 22 percent. But the president has already said he will not recommend any increase this year. If Congress rejected his alternative plan--for a zero raise--the full increase would go into effect.

Top officials of both the Carter and Reagan administrations have argued that the current government vs. industry pay comparison system presents a distorted picture, since it does not include salaries paid in many middle-sized and small firms, nor pay for the nation's 12 million state and local government workers.

In light of the Supreme Court ruling (striking down the so-called legislative veto), AFGE hopes it can get a legal ruling that the portion of the pay act that limits Congress to a veto role in federal pay matters will be declared unconstitutional. If the court agreed with the AFGE it could, in theory, order the government to make up the pay raises denied in the past three years.

It is a long shot, but now that it is in the hands of the courts it should provide several evenings of nightmares for David Stockman and dedicated budget-cutters everywhere.