Is this what you are looking for?
set.seed(1)
MAT <- matrix(sample(1:16), nrow = 4)
MAT
#> [,1] [,2] [,3] [,4]
#> [1,] 9 2 13 6
#> [2,] 4 14 5 15
#> [3,] 7 12 11 16
#> [4,] 1 3 10 8
apply(X = MAT, MARGIN = 2, FUN = which.max)
#> [1] 1 2 1 3
Created on 2020-11-13 by the reprex package (v0.3.0)