If you choose credit on a debit card when making an in store transaction you'll be asked for your PIN number which helps to make the transaction more secure.
I'm always advised at my local store to choose credit instead of debit because it's supposed to be more secure and I've never had any issue with selecting credit when using my debit card.
I asked my bank and they said it was more secure that way as well.
Either way you'll still be paying from your bank account through your debit card and you must have the money in the debit card for it to go through but choosing credit helps keep your transaction more secure.
Either way you can choose either debit or credit when using a debit card but when using a credit card you must usually choose credit.