It doesn't. If you make up identical solutions from different starting materials, they don't "know" where they came from. For example, if you mix a 1M solution of NaCl with a 1M solution of KBr, you get exactly the same result as you do if you mix 1M NaBr with 1M KCl - a solution equimolar in Na+, K+, Cl- and Br- ions. No anions belong to particular cations, irrespective of how the solution was made.
It is misleading to say that a solid salt retains its properties when dissolved. (It doesn't retain its high melting point, for example, or electrical insulation.) The properties of an aqueous solution of NaCl are different from those of solid NaCl. (I presume that even the "taste" of salt is actually the taste of it dissolving in your saliva.)