If all you knew about India is that it ranks 111th out of 144 countries in economic freedom--last among large economies and four places below China--you’d pretty quickly scratch it off the list of places to do business. But India is not just one economy. It is a complicated, staggeringly diverse place, and a great deal depends on where in the country you set up shop.

That truth is made abundantly clear by last week’s Economic Freedom of the States of India 2012 report prepared by Indian econometrics firm Indicos Analytics and a trio of global libertarian think tanks, including the U.S. Cato Institute. An Indian version of the Canadian Fraser Institute’s Economic Freedom of the World, the report ranks the 20 states of India for which data exists on size of government, safety and protection of property rights, and regulation of labor and business. “The goal of the ranking,” says economist Bibek Debroy, one of the authors of the report “is to compare the enabling environment different states offer to investors.”

The conclusion: If you’re looking to do business in the world’s second-fastest growing large economy, location matters. Focus on these five states:

5. Himachal Pradesh. This landlocked north Indian state almost as large as West Virginia, and sharing a small border with China is best known for its picturesque mountains, breathtaking views and friendly people. But it holds on to the No. 5 rank for the second time, with a six-year average annual GDP growth rate of 8.4%. It scores high on regulation of business--labor laws, for example, are among the most reasonable for entrepreneurs in India. The state lost ground, however, falling four places to No. 9 in safety and property security.

4. Haryana. The biggest advantage of this state, the combined size of Maryland and Delaware, is its geographical and political alignment with New Delhi. The Congress Party governs this state, as it does the nation, and the prosperity of India’s capital overflows into Haryana, particularly into the IT services hub of Gurgaon. The booming technology industry has triggered a real estate boom, as well, and led to economic growth of some 9.6% a year since 2005. The state, however, has done a poor job investing in infrastructure and crime has been soaring: Haryana’s rank in security crashed to 8th from 3rd in 2005. The murder of a Japanese manager in a labor riot at a Maruti Suzuki factory last year crystallized the crime wave and has left business owners edgy.

3. Madhya Pradesh. This centrally located state, about the size of New Mexico, has stayed right on top in measures of business security, and its location gives its companies access to five of the largest consumer markets of India--Delhi, Mumbai, Kolkata, Chennai, and Bangalore. The state, however, has one of the largest and freest-spending government sectors (19th of the 20 states), and the economic growth rate of 7.1% over the past six years is modest by Indian standards.  Still, if the state could shrink the size of government as a percentage of the economy--admittedly easier said than done--it could easily jump to the top spot among India’s states.

2. Tamil Nadu. With a coastline of 1,076 km, this south Indian state, about the size of Louisiana, has been able to attract some major global companies--among them Ford (US), Hyundai (South Korea) and BMW (Germany)--and deliver a growth rate of 10.2%. Fourth among Indian states in the size of its economy, Tamil Nadu ranks high on safety and relaxed regulation. The large government sector (9th among the 20 states ranked) has invested well in human development indices like education. The state is considered a model in striking a balance between growth and equality, a balance that has proven elusive elsewhere in India.

1. Gujarat. India’s fifth-largest economy, Gujarat shows what good economic governance and forward-thinking leadership can achieve in India. The state is growing at 10.2% annual rate, and having put the ghastly sectarian violence of 2002 behind it, has improved its security ranking to 4th place from 12th over the past six years. It is one of the most efficiently run governments in the country, ranking No. 2 in the size of government compared to GDP (smaller being better). This has helped pushed Gujarat to the top slot, from No. 5 in 2005 and No. 2 in 2009. Businesses are rushing the state, creating jobs and wealth. However, India’s most high-profile investment destination could do better in developing human capital, where it ranks 7th.