MSBuild Transformation

We have a bunch of config files in our project, and only need the matching one’s deployed to the matching environment. In Azure we were able to utilize it with the Transformation feature. Below is an example of files along with their environment. How do we do this in Gitlab?

Dev = DataConfig.Dev.config, SystemConfig.Dev.config, Web.Dev.Config
Stage = DataConfig.Stage.config, SystemConfig.Stage.config, Web.Stage.Config
Prod = DataConfig.Prod.config, SystemConfig.Prod.config, Web.Prod.Config