Your question does not indicate whether or not you currently own a home or if the home you are considering purchasing would be the only home you own.
If you currently own a home and the home under consideration is in your same general area, all the lenders I work with would catch this and require the property to be classified as investment. On every loan application there is a section called R.E.O. (Real Estate Owned) and you are required by Federal Law to list all properties you own. This is a disclosure on your part, but every underwriter checks public records to determine if what you have declared to be true is in fact true.
If you are currently not a home owner but are looking to buy this home as your primary occupancy home and then decide to move out a few months later, that's a diferent situation. When the underwriter checks public records they will not find that you own any other properties.
I have some customers who when purchasing a new home have moved out of an existing home that they own and have turned that existing home into rental property. Some have refinanced those mortgages into investment loans, others have not. Some have been forced to refinance when their lender discovered that they no longer lived there. Others have never been discovered.
To knowlingly lie on a loan application and then sign your name to the application's page three sets yourself up for fraud investigation. I don't know about you, but I prefer waking up in my king sized bed every morning rather than a twin bed held to the wall by chains.
If you're looking to cash flow an investment property, figure worst case scenario, which will be the higher rate. If you somehow are successful in getting the lower rate by falsifying the occupancy status, you could be discovered and forced to refinance at a higher rate, then your property will not likely cash flow according to plans.