Pick
Pick[list, sel] picks out those elements of list for which the corresponding element of sel is True.
Pick[list, sel, patt]picks out those elements of list for which the corresponding element of sel matches patt.
Examples
Pick[{a, b, c, d}, {True, False, True, False}]
(* {a, c} *)Please visit the official Wolfram Language Reference for more details.