If a program of study has listed specific courses that can count as electives, then only those will be eligible unless an adjustment is made by your academic advisor. If there is no specified list, then any course will count as long as enough open elective hours exist in your program of study to cover the entire course.
For example, you might have only 2 elective hours remaining in your degree plan and are free to take any course to fulfill those 2 hours, but are taking a 3 credit hour course, that 3 hour course will not count. The degree evaluation process in this case determines that 3 hours is too many for the available slot, and the 3 hour course is listed as not counting in its entirety as a result.