A Fairfax County judge ruled yesterday that a Richmond man who claims to own $27,000 in cash that was found last December in a Fairfax County motel room and turned over to police must tell attorneys for the county where he got the money.

But Thomas Tucker, the man who has hiterto refused to disclose how he obtained the money, will not answer the question when it is asked of him in court, according to his attorney, who claims Tucker's right to privacy would be violated.

Circuit Court Judge Thomas J. Middleton ruled following a two-hour hearing yesterday that "counsel has a right to inquire as to ownership. (The county attorney is) entitled to ask those questions and he's entitled to an answer. The issue is still a civil case with a simple question: By what right does Mr. Tucker claim ownership?"

The county is contesting Tucker's claim.

Victor M. Glasberg, Tucker's attorney, said earlier in the hearing that "our claim is based on the fact the he (Tucker) left it in the motel room. We are not going to come in here and bring witness after witness saying how Tom (Tucker) got that money."

The money was found in a Garfinckel's shirt box Dec. 28 in Room 15 of the Brookside Motel, 6001 Richmond Hwy., by Charles Black, a motel employee, who gave it to county police. The $27,000 is now earning interest in a county bank.

Tucker, 23, a college student who neighbors say has sold real estate, filed suit against the county in January in an effort to get possession of the money.

County Attorney David Stitt said in court yesterday he should be allowed to ask Tucker how he got the money because the cash may be involved in criminal activity.

He maintained that it is not normal for a person to carry around $27,000 and that he has a moral obligation to the community to assure that the money was not obtained illegally.

Judge Middleton remarked that he has seen no evidence of criminal activity surrounding the money.