cbind(x[1],matrix(paste(colnames(x)[apply(x[,2:4],1,order,decreasing=TRUE)+1],
apply(x[,2:4],1,sort,decreasing=TRUE)),ncol=3,byrow=TRUE))
# Name 1 2 3
#1 John French 86 Math 78 English 56
#2 Sam Math 97 French 86 English 79
#3 Viru English 93 Math 44 French 34