cd $(ls | awk 'BEGIN{srand();}{print rand() "\t" $0}' | sort -n | head -n 1 | cut -f2)

Change directory to the first file listed in the directory, chosen randomly.
cd $(ls | awk 'BEGIN{srand();}{print rand() "\t" $0}' | sort -n | head -n 1 | cut -f2)