(a) An action brought in a court of common pleas by the Commonwealth on the relation of the Attorney General may be brought only in
(1) the county where a political subdivision is located when the action is against the political subdivision or an officer thereof, or(2) the county where the registered office or principal place of business of a corporation or similar entity is located when the action is against the corporation or similar entity or an officer thereof.(b) An action brought in a court of common pleas in the name of the Commonwealth on the relation of the District Attorney may be brought against a political subdivision or an officer thereof only in the county where the political subdivision is located.(c) An action brought in a court of common pleas in the name of a party to enforce a right or to compel performance of a public act or duty in which the party has a beneficial interest distinct from that of the general public may be brought only in
(1) the county in which the cause of action arose when the action is against an officer, department, board, commission or instrumentality of the Commonwealth, or(2) the county where a political subdivision is located when the action is against the political subdivision or an officer thereof, or(3) the county where a corporation or similar entity has its registered office or principal place of business when the action is against the corporation or similar entity or an officer thereof.