As was noted, the retirement annuity pension is the only portion of the social security benefits that you may be able to claim. In order to determine whether you are entitled to cash out those contributions, you would need to contact the pension authorities:
Instituto Nacional de Seguridad Social
Ministerio de Empleo y Seguridad Social
C/ Padre Damián, 4-6
ES - 28036 MADRID
Tel: +34 915 68 83 00
Spain and India do not have a bilateral social security agreement, and one would have to have contributed to the pension scheme for 15 years to qualify for an annuity pension or lump sum payout, and at a certain age. To understand the implications of early withdrawal (e.g., taxes, penalties), you may wish to seek expert advice on what applies to your situation.