Is this what you mean?
library(dplyr)
sample_df <- data.frame(
id = c(1, 2, 3),
V1 = c(2, 8, 1),
V2 = c(7, 3, 5),
V3 = c(9, 6, 4)
)
sample_df %>%
rowwise() %>%
mutate(max = names(sample_df)[2:4][which.max(c(V1, V2, V3))])
#> Source: local data frame [3 x 5]
#> Groups: <by row>
#>
#> # A tibble: 3 x 5
#> id V1 V2 V3 max
#> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 1 2 7 9 V3
#> 2 2 8 3 6 V1
#> 3 3 1 5 4 V2
Created on 2020-01-27 by the reprex package (v0.3.0.9000)