I want you figure it out on your own, but here is all the info you will need to know to approach this problem.
Courtesy of MasteringChemistry.com:
You should first know the reduction and oxidation reactions of water:
reduction: H2O (l) + 2e^- — > H2 (g)+ 2OH^- (aq)
oxidation: H2O (l)--> 2H ^(+) (aq) + 1/2 O2 (g) + 2e^-
"Hint 1. How to approach the problem
Hydrogen is produced from the reduction of water. Oxygen is produced from the oxidation of water. You need to identify the salts for which water is favored for both the reduction and oxidation half reactions. In other words, the cation of the salt must have a lower reduction potential than water and the anion of the salt must have a lower oxidation potential than water."
Hint 2. "Identify cations with a lower reduction potential (a more-negative value) than water" which will give you the elements that are oxidized (are the anode in the reaction), and will react with H2O to form hydrogen gas, as shown in the reduction reaction for water at the top. Keep in mind, the oxidized atom will be the reducing agent.
For the reduction of water (oxygen gas produced), "Identify anions with a lower oxidation potential than water" (basically same as step 2)