Karen K. Johnson, who went to jail in 1984 rather than testify to a grand jury investigating alleged drug use by D.C. Mayor Marion Barry and others, spent nearly three hours yesterday answering questions before another federal grand jury probing whether she was paid $20,000 to $25,000 in hush money for her silence.

Johnson, 35, who pleaded guilty to cocaine charges three years ago and has been given immunity in the current investigation, has detailed the alleged payments in a series of lengthy meetings with prosecutors over the past four months, but yesterday was the only time she had answered questions under oath.

The testimony by Johnson, the first by any of the key figures in several overlapping probes of alleged corruption involving city officials and contractors, was seen by observers as an attempt by prosecutors to increase pressure on others.

In addition to the probe of payments to Johnson, three separate federal grand juries are investigating the award of numerous contracts by city agencies, the possible use of city funds to pay for Barry's personal expenses and allegations that some D.C. police officers personally profited from the enforcement of drug laws.

Johnson refused to comment about her grand jury appearance as she left the courthouse. "Mum's the word," she said. Johnson's lawyer, G. Allen Dale, said he had no comment on his client's testimony.

Sources said Johnson was expected to be questioned about her personal relationship with Barry from 1981 to 1983, the 20 to 30 times she allegedly sold cocaine to Barry during that period and the alleged hush money.

Johnson has told prosecutors that she received payments from her former attorney, John A. Shorter, and D.C. businessman John B. Clyburn and that she believes businessman Roy Littlejohn also may have contributed money, but she has not implicated Barry in the payment scheme, according to sources.

Barry has said he has never purchased or used cocaine, and that if Johnson received payments from anyone he did not know anything about them. Reached yesterday in Leesburg where he was attending a management seminar, Barry said he had no comment on Johnson's court appearance.

Clyburn has acknowledged that he gave Johnson some money, but that the payments had nothing to do with her refusal to testify before the grand jury, according to sources. Clyburn and Littlejohn have denied any wrongdoing.

Johnson's testimony comes two months after her brother, Jared Kinnon, appeared before the same grand jury for about an hour. Sources said Kinnon testified that he received money from Shorter, then Johnson's attorney, while Johnson was in jail.

Allan M. Palmer, an attorney for Shorter, has said that his client did nothing wrong. Shorter is now in prison on unrelated federal tax charges.

Johnson has told prosecutors that she received payments, usually of $200 to $300 and never more than $1,000, at several locations, including Clyburn's office at Decisions Information Systems Inc. and on the tennis courts of the Shoreham Hotel on Calvert Street NW.

Johnson and her relationship with Barry have been investigated by federal prosecutors since early 1983 when they were first told that Johnson had sold cocaine to several city employes. In a tape-recorded June 6, 1983, conversation, Johnson told her former boyfriend, who was acting as a government informer, that she had sold cocaine to Barry 20 to 30 times, and that she had kept written records of the transactions.

In October 1983 prosecutors subpoenaed Johnson's personal diaries for 1980 through 1983, but she denied she had such records and said she would not cooperate with authorities even if she received immunity from prosecution.

Johnson was indicted in April 1984 on cocaine distribution charges and pleaded guilty that June to cocaine distribution conspiracy and possession of cocaine. One day after she began serving her four-month prison sentence, she refused to testify before the grand jury continuing its investigation of alleged drug use by Barry and others and was jailed for contempt.

She served eight months at the D.C. Jail on the contempt charge, where she was kept in protective custody most of the time, and later served the four-month sentence.

Last May 22, two months before Johnson's probation was to expire, FBI agents searched her Northwest Washington row house and seized hundreds of items, including photographs of Johnson with Barry and personal letters from Barry.

Also seized were financial and personal records, including bank statements and personal diaries, although sources said the records that had been subpoenaed by the 1983 grand jury were not found.