The former first minister has not ruled out remaining in the Scottish Parliament as an SNP MSP.