One way is to start with empty matrix. Add the first column. Then loop, each time adding the next column, and checking if the rank of this matrix has increased from before, if so, keep it, else skip over to the next column. Keep doing this until you reach the last column in the original matrix, or have collected m columns, where m is the rank of the original matrix. (no need to keep trying if found m columns).
function
indepCols[mat_?(MatrixQ[#, NumericQ] &)] := Module[{nRows, nCols, m, idx,
i, vecs, candidate},
{nRows, nCols} = Dimensions[mat];
m = MatrixRank[mat];
idx = Table[1, {m}]; (*arrary to collect the index of columns*)
vecs = {mat[[All, 1]]}; (*first column is always in*)
Do[
candidate = Join[vecs, {mat[[All, i]]}];
If[MatrixRank[candidate] > Length[vecs],(*did the rank increase?*)
idx[[Length[vecs] + 1]] = i;
vecs = candidate;
If[Length[vecs] == m, Break[]](*bail out if got the rank*)
],
{i, 2, nCols}
];
{idx, vecs}
]
To use the above function:
First example
(mat = {{1, 0, -2, 1, 0}, {0, -1, -3, 1, 3}, {-2, -1, 1, -1, 3},
{-2, -1, 1, -1, 3}, {0, 3, 9, 0, -12}}) // MatrixForm

The above has rank 3. So there will be 3 L.I. columns
{idx, out} = indepCols[mat];
Transpose[out] // MatrixForm

idx
(*{1, 2, 4}*)
Verified using "AdjacencyLists" thanks to Michael E2 above.
sa = Transpose@Unitize@SparseArray@RowReduce[mat];
row2col = Rule @@@ Reverse /@ First /@ GatherBy[sa["NonzeroPositions"], First];
Thread[Range[First@Dimensions@sa] -> (sa["AdjacencyLists"] /. row2col)]

second example
Using example given by Michael E2, which is much larger
SeedRandom[1];
mat = RandomSample[#~Join~Accumulate@RandomSample[#, 2] &@
RandomInteger[{-5, 5}, {35, 37}]];
{idx, out} = indepCols[mat];
idx

Verified:
sa = Transpose@Unitize@SparseArray@RowReduce[mat];
row2col = Rule @@@ Reverse /@ First /@ GatherBy[sa["NonzeroPositions"], First];
Thread[Range[First@Dimensions@sa] -> (sa["AdjacencyLists"] /. row2col)]

The above gives the index of the L.I. columns. To find the index of the L.D. columns,
simply take the complement:
Complement[Range[1, Length[mat]], idx]
(*{36, 37}*)