For this specific use case, CSV.read (Reading · CSV.jl) seems to accept keyword arguments select or drop that take a vector of column names (strings or symbols), positions (integers), or booleans (examples) in a way that invalid column names are just ignored.
using CSV
data = """
a,b,c
1,2,3
4,5,6
7,8,9
"""
vars = Symbol.(["a","g","c"])
file = CSV.File(IOBuffer(data); select=(i, name) -> name in vars)
# output:
3-element CSV.File:
CSV.Row: (a = 1, c = 3)
CSV.Row: (a = 4, c = 6)
CSV.Row: (a = 7, c = 9)