Rental market in all the cities you have listed are good. It also depends on whether you are looking at Single Family homes or condos/townhouses since then you will have the HOA dues take away some of your ROI.
Castro Valley and Fremont are more desirable from an investment perspective since the schools are very good and you will be able to rent it easily. Plus when you want to sell the property, it will have more buyers and the appreciation will also be higher than the other cities. But then, keep in mind, you will be paying a higher price to begin with because of the demand in these 2 cities.
Help-U-Sell Achievers Realty