Section 5. A civil action to obtain relief formerly available by writ of mandamus may be brought in the supreme judicial or superior court or, if the matter involves any right, title or interest in land, or arises under or involves the subdivision control law, the zoning act, or municipal zoning, or subdivision ordinances, by–laws or regulations, in the land court.