You do not provide many details, so I will give a general answer.
To read in the file, assuming it has headers,
DF <- read.csv("Path/To/Your/File.txt", sep = "\t", header = TRUE)
To pick out columns 3, 7, and 23 by position
DFselect <- DF[, c(3,7,23)]
To pick out columns by name, assuming names of Location, Date, and Data3
DFselect <- DF[, c("Location", "Date", "Data3")]
To save the file
write.csv(DFselect, file = "Path/To/The/Location.csv", row.names = FALSE)