I’m not a lawyer so I’ll give you an engineer’s perspective.
The answer to your question will depend on what rights you want to grant to others who use your code and what rights you want to restrict. If you have used other open source code in your project, your options may be limited. Here are the key questions I think about when choosing or evaluating an open source license.
Ownership. As the author and copyright holder you will always have a license to your code as long as you don’t transfer your ownership rights to some other person or organization. That means, regardless of how the code is licensed to others, you can do as you wish with the code. A license simply defines how others can use code you release under that license. You can also release future updates to your code under a different license that prior releases (MongoDB recently did this). What you cannot do is change a license of code already released to another party after you have released it.
Compatibility. What other software do you want your software to be compatible with? Review this Wikipedia article on Software License Compatibility and review related references. Note that compatibility flows one way. Projects with incompatible licenses cannot use your code, so if you pick a GPL3 license then only GPL3 or AGPL projects can build upon your work.
Multi-Licensing. If you own the code, you can release it under multiple licenses. For example, you may offer a GPL license to projects that want to use the code for free and you may offer a commercial license to projects that can’t use GPL code but are able to pay you for a commercial license. Multi-licensing can confuse your users and get people who think your code is free into trouble, so be cautious and communicate clearly if you choose a multi-license strategy.
Patents. Some licenses, like Apache 2.0, also authorize users of your code to use your patents. Other licenses, like Mozilla Public License, retain patent rights. Retaining patent rights doesn’t mean people must pay you to use your patents, but it does mean you can defend your patents or ask people using your code in a way you dislike to stop violating your patents. You need to decide which approach you want to take.
Trademarks. Some licenses, like BSD 3-Clause, prohibit users of your code from using your trademarks and branding. This prevents them from making a derivative work & offering it under your brand. If the brand name of your software is important then it may be important to protect. People can still use BSD 3-clause code, but they need to advertise and market it under their own name.
Enforceability. Licenses are legal documents and not all of them will hold up in court. To increase the odds your license will be legally meaningful it can help to pick a popular open source license that has been tested by others. GPL has been around for a while, and I think has survived in court, so it is an example of a well known and tested license. The Open Source Initiative works to identify, evaluate, and promote licenses and is one place you can check to understand how popular or open various licenses are.
While Creative Commons licenses aren’t appropriate for code, it’s worth reading some of the articles on the Creative Commons website. They explain licensing in an approachable way. I’ve learned a lot from them.