How to normalize test data according to the training data if the normalization on the training data is performed row wise?
You usually want to normalize features as you also pointed out. In case of tabular data almost every machine learning implementation will expect you to provide the features as columns and observations as rows. In your case if you have a feature in a row you may want to transpose it or if they are not the same features than you may apply a different transformation.

If you do normalization on features you have to use the same transformation on test data that you used on train data. (if you use i.e. sklearn implementations they will take care of it for you)