You cannot legitimately access them. The Pokémon Mansion (Route 212) has no "off-limit rooms" in normal play—all areas are reachable via the statue switches (rotate statues to open doors).
If you mean glitched/out-of-bounds areas:
Don't do it. The intended content (Rotom, Rare Candy, TMs, Old Chateau) is fully accessible via switches. Enjoy the game as designed.