@Kusum Chanrai
One way to speculate on heavy upside is turning to areas which are soon to be better served by public transportation, for example Chinatown which will soon see the extension of the Muni Metro T Third line through the financial district. A station will be opened at Stockton/Washington with service starting in 2019 so expect the demand of property within walking distance of that station to appreciate in the following years. A great place to educate yourself is the SFMTA website where all the projects they are currently working on are listed.
https://www.sfmta.com/projects
The other way you could speculate is by following sheer density, such as Mission Bay or Potrero Hill where there are a lot of new developments going up - almost endlessly. The large corporations and REITs will bring transportation to them in some way or another which will spur the desirability and presumably, value.
Ultimately this will be a very long term play for you. So feel free to buy in a neighborhood you like and "ride" it out. Remember you still have to live there! I also like other areas in the lower part of district 5 ie. Noe Valley to Glen Park. These areas propose a very good reverse commute for silicon valley which is always going to be the anchor to SF real estate.
There are many different ways to look at it! Hope this helps!