Of course under Official competitions you can never do so as per the FIFA rule:
"FIFA LAW OF THE GAME: (Law 3 - Number of Players)
Official Competitions
Up to a maximum of three substitutes may be used in any match
played in an official competition organised under the auspices of FIFA,
the confederations or the member associations."
However, under some condition you may proceed the subsittution:
"The rules of the competition must state how many substitutes may be
nominated, from three up to a maximum of seven." (Law 3 - Number of Players - Official Competitons)